<ytata:bbs listname="bbs" order="$_GET['order']" category1="$_GET['cat']" category2="$_GET['cat1']" answernum="3" praisenum="5" num="5" startrow="$startrow" tagid="$_GET['t']" key="$_GET['key']"/>
<volist name="bbs.list" id="b">
    <div class="ask_list" >
      <div class="tit" onClick="location.href='{$b.url}'" >
        <div class="avatar"><img src="{$b.adduser.avatar}"></div>
        <div class="txt">
		
          <div class="h  font16 substring link_gray3">
				{$b.adduser.nickname}
          </div>
		  
		  
          <div class="mo font12 font_gray9">
		    <span class="lv font9">LV{$b.adduser.exp_lv}</span>
            <span class="us">{$b.addtime|formatdate}</span>
            <span class="us">{$b.click}浏览</span>
          </div>
		  
		  
        </div>
        <div class="more J_more" id="{$b.id}" reply_nickname="{$b.adduser.nickname}" onClick="event.cancelBubble = true"></div>
      </div>
      
      <div class="exp font_gray9 font14" onClick="location.href='{$b.url}'">{$b.content_cut}
        <neq name="b.replycount" value="0"><span class="reply_count">({$b.replycount}回帖)</span></neq>
      </div>
      
	  <notempty name="b.tags">
      <div class="tag font10">
        <volist name="b.tags" id="tag">
          <div class="tl">{$tag.tag}</div>
        </volist>
      </div>
	  </notempty>
	  
	  <notempty name="b.img">
	  <div class="imgs">
	  	<volist name="b.img" id="img">
    	<div class="imgli J_imgs"><img src="{$img.url}"></div>
		</volist>
 	 </div>
	 </notempty>
      
      <div class="bottombtn font13">
        <div class="btn a1 J_reply" data-id="{$b.id}" reply_nickname="{$b.adduser.nickname}">回帖</div>
        <div class="btn a2 J_share">转发</div>
        <div class="btn a3 J_favorites" id="fav_{$b.id}" data-id="{$b.id}" data-type="3">收藏</div>
        <eq name="b.count_praise" value="0">
          <div class="btn last a4 J_praise" id="J_praise3_{$b.id}" data-id="{$b.id}">点赞</div>
          <else/>
          <div class="btn last a4 J_praise" id="J_praise3_{$b.id}" data-id="{$b.id}">{$b.count_praise}</div>
        </eq>
        
      </div>
      <notempty name="b.praise">
        <div class="zan">
          <div class="zt"></div>
          <volist name="b.praise" id="praise">
            <div class="avatar"><img src="{$praise.user.avatar}"></div>
          </volist>
          <div class="count font12">等{$b.praise_count}人</div>
        </div>
      </notempty>
      
      <notempty name="b.answers">
        <div class="reply font12">
          <volist name="b.answers" id="answer">
            <div class="cons"><span>{$answer.user.username}:</span>{$answer.content}</div>
          </volist>
          <div class="more" onClick="location.href='{$b.url}'">更多回答({$b.answers_count})...</div>
        </div>
      </notempty>
    
    </div>
    <div class="uu_spacing"></div>
  </volist>
<empty name="bbs.list"><div class="empty font10">木有可显示的数据喔！</div></empty>
<script>
$('.J_more').off().on('click',function(e){
			var bid=$(this).attr('id');
			var reply_nickname = $(this).attr('reply_nickname');
			var $Scroll = new UpScroll({
				maskClose: true,
				showCancel: true
			});
			$Scroll.setContent(['举报','回复']);
			$Scroll.show();
			$Scroll.getList(1).on('click', function() {
			 var params = {objid:bid,type:'3'};
			  ajax_login('ajax_report', params);
			$Scroll.fast_hide();
			});
			
			$Scroll.getList(2).on('click', function() {
			ajax_login('ajax_bbs_reply', {bid: bid,reply_nickname:reply_nickname});
			$Scroll.fast_hide();
			})
		
		
		});
	  // 点赞
	   $(".J_praise").off().on('click', function () {
          var id = $(this).data('id');
          var params = {id: id, type: '3'};
          ajax_login('praise', params);
      });
      //收藏
      $(".J_favorites").off().on('click', function () {
          var id    = $(this).data('id');
          var type = $(this).data('type');
          var params = {id: id, type:type};
          ajax_login('ajax_favorites', params);
      });

      // 回帖
	   $(".J_reply").off().on('click', function () {
          var bid = $(this).data('id');
          var reply_nickname = $(this).attr('reply_nickname');
          var params = {bid: bid,reply_nickname:reply_nickname};
          ajax_login('ajax_bbs_reply', params);
      });
	  //分享
	  bind_share();
	   //图片幻灯片
	  $(".J_imgs").off().on('click', function () {
          // build items array
          var imgs = $(this).closest('.imgs').find('img'),
		  	items = new Array(),
			thisIndex = $(this).closest('.imgs').find('img').index($(this).find('img'));
		  	imgs.each(function(){
		  		items.push({src:$(this).attr('src'),w:1200,h:900});
		  	});
          	swipe(items, thisIndex);
      });
</script>
<empty name="bbs.list"><!--empty --></empty>
